package com.gitee.lamda;


import java.util.function.Function;

/**
 * @ClassName Lamda
 * @author yanming
 * @Description lamda语法学习主类
 * @date 2018-12-07 13:45
 * @version 1.0
 **/
public class Lamda {

    public static void main(String[] args) {

        testFunction();

    }

    private static void testFunction(){
        String str = "10";

        Integer i = 20;
        Lamda.lamdaFunction(str,i,(a)->{Integer.valueOf(a); System.out.println(a);return 3;});
    }

    private static void  lamdaFunction(String str, Integer i, Function<String,Integer> function){
        System.out.println("Str值{"+str+"},i值{"+i+"},输出结果{"+function.apply(str)+"}");
    }
}
